home *** CD-ROM | disk | FTP | other *** search
/ SVM Mac CD-ROM 17 / SVM Mac CD-ROM - No 17.iso / Accès direct / Trésors du domaine public / Programmation / launch-creator / Readme < prev    next >
Text File  |  1996-06-09  |  2KB  |  51 lines

  1. What:  get any file/folder "double-clicked" from within a running program
  2.  
  3. Keywords: launch, Finder, scripting, AppleEvent
  4.  
  5. Contents:
  6.   Readme    - this file
  7.   launcher.cc - commented source code
  8.   vlauncher.cc   - verification routine
  9.   vlauncher.pi    - CW9 project to run the test
  10.   alias_to_fname.cc - get the full file name from an FSSpec/AliasHandle
  11.   mymenv.cc \
  12.   mymenv.h   - my standard Mac env (included for completeness)
  13.   notify.cc /
  14.  
  15. Language: C++, CodeWarrior9
  16. System: System 7.x (7.5.3) but probably 6.x is OK, too.
  17. Comments to: oleg@ponder.csci.unt.edu, oleg@unt.edu
  18. Version 1.1, June 1996
  19.  
  20. New in version 1.1
  21.   - file/folder name to open can be specified either as an ASCII C string, or
  22.      as a FSSpec
  23.   - included (and shown off) code to convert FSSpec to the full path name
  24.      (and how it can be used to figure out the full path name to the system folder)
  25.   - now works under CW9 (the previous version was compiled with Symantec C++ 6.0)
  26.  
  27.  
  28. Explanation:
  29. This is a simple program that, given a file name or FSSpec, launches an
  30. application-creator and has it handle the file. If the file
  31. is an application, it is launched itself. The net result is
  32. exactly the same as if the user had double-clicked on the file.
  33. Synopsis
  34.    void open_selection(const FSSpec& file_spec)
  35.    void open_selection(const char * full_path_name)
  36. Where the 'full_path_name' tells the full path name of the file/folder that
  37. should be "double-clicked". Though, a relative path name would do,
  38. too. The 'file_spec' tells the file specification (volume refno,
  39. directory ID and the file name) of the file/folder to "double-click" on.
  40.  
  41. Please check out vlauncher.cc to see various ways of vicarious clicking on
  42. files/folders from a running code.
  43.  
  44. The present program achieves the magic by sending an 'Open Selection'
  45. event to the Finder. It is significantly based on the FinderEvents
  46. stack by Jon Pugh and Apple Computer, Inc. (C) 1991-92 Apple Computer, Inc.)
  47. (which is written in Pascal and _very_ big and messy)
  48.  
  49.     If you need further information or details, please mail me. If you want to see more
  50. functionality added, mail me too.
  51.